﻿//-----------------------------------------------------------------------
// <copyright file="AppDomainEntity.cs" company="CodePlex">
//     Copyright (c) Doug Holland, CodePlex. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
namespace CodePlex.Diagnostics.Model
{
    using System;

    using CodePlex.Diagnostics.Contracts;

    /// <summary>
    /// Represents an application domain, which is an isolated environment where applications execute.
    /// </summary>
    public sealed partial class AppDomainEntity
    {
        #region public AppDomainEntity()

        /// <summary>
        /// Initializes a new instance of the <see cref="T:AppDomainEntity"/> class.
        /// </summary>
        public AppDomainEntity()
        {
        }

        #endregion

        #region public AppDomainEntity(AppDomainDataContract AppDomain)

        /// <summary>
        /// Initializes a new instance of the <see cref="T:AppDomainEntity"/> class.
        /// </summary>
        /// <param name="contract">An instance of the <see cref="T:AppDomainDataContract"/> class to be used to construct an instance of the <see cref="T:AppDomainEntity"/> class.</param>
        public AppDomainEntity(AppDomainDataContract contract)
        {
            this.BaseDirectory = contract.BaseDirectory;

            this.DomainManager = contract.DomainManager;

            this.FriendlyName = contract.FriendlyName;

            this.Id = contract.Id;

            this.RelativeSearchPath = contract.RelativeSearchPath;
        }

        #endregion
    }
}
